//
//  Material.h
//  Ray Tracer
//
//  Created by Kaila, Ashish on 3/23/13.
//  Copyright (c) 2013 Kaila, Ashish. All rights reserved.
//

#ifndef __Ray_Tracer__Material__
#define __Ray_Tracer__Material__

enum ColourType
{
    Ambient,
    Diffuse,
    Specular
};

struct Colour;
struct Intersection;

class Material
{
public:

    Material (double specularExp,
              double diffuseReflectivityFactor,
              double specularReflectivityFactor,
              double refractiveIndex);

    virtual Colour getColour(ColourType type, const Intersection& intersection, bool inShadow) const = 0;

    double getSpecularExp() const;
    double getDiffuseReflectivityFactor() const;
    double getSpecularReflectivityFactor() const;
    double getRefractiveIndex() const;
    void setGlossFactor(unsigned int glossFactor);
    unsigned int getGlossFactor() const;
    
private:

    // Specular expoent.
    double _specularExp;
    
    // Diffuse reflectivity factor
    double _diffuseReflectivityFactor;
    
    // Specular reflectivity factor
    double _specularReflectivityFactor;
    
    // Refractive index
    double _refractiveIndex;
    
    // Gloss factor
    unsigned int _glossFactor;
};

#endif /* defined(__Ray_Tracer__Material__) */
